#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

int  huiwen(int x)
{
	int n = x, a = 0, b = 0;
	while (n > 0) {
		++a;
		n = n / 10;
	}
	if (a == 3) {
		int c = x % 10;
		int d = x / 100;
		if (c == d) {
			b = 1;
		}
	}
	if (a == 4) {
		int c = x % 10;
		int q = x / 1000;
		int e = (x % 100) / 10;
		int r = (x % 1000) / 100;
		if (c == q && e == r) {
			b = 1;
		}
	}
	return (b);
}

int main()
{
	for (int i = 200; i <= 3000; i++) {
		int s = huiwen(i);
		if (s == 1) {
			printf("%d\n", i);
		}
	}
	return 0;
}